home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / a_man / cat1 / ftpd.z / ftpd
Encoding:
Text File  |  2002-10-03  |  19.9 KB  |  397 lines

  1.  
  2.  
  3.  
  4. FFFFTTTTPPPPDDDD((((1111MMMM))))                                                              FFFFTTTTPPPPDDDD((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ftpd - Internet File Transfer Protocol server
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ////uuuussssrrrr////eeeettttcccc////ffffttttppppdddd [ ----ddddSSSSllllpppp ] [ ----tttt_t_i_m_e_o_u_t ] [ ----TTTT_m_a_x_t_i_m_e_o_u_t ]
  13.          [ ----uuuu_u_m_a_s_k ]
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      _F_t_p_d is the Internet File Transfer Protocol server process.  The server
  17.      uses the TCP protocol and listens at the well-known port specified in the
  18.      _s_e_r_v_i_c_e_s(4) file.
  19.  
  20.      _F_t_p_d is started by _i_n_e_t_d(1M) whenever a remote client makes a connection
  21.      request.  The following options should specified on the ftpd line  in
  22.      _i_n_e_t_d's configuration file, /etc/inetd.conf.
  23.  
  24.      If the ----llll option is specified, each successful and failed ftp session
  25.      login is logged in the syslog.  If this option is specified twice, the
  26.      retrieve (get), store (put), append, delete, make directory, remove
  27.      directory and rename operations and their filename arguments are also
  28.      logged.  If this option is specified thrice, logging for the retrieve
  29.      (get) and store (put) commands includes the number of bytes transferred.
  30.  
  31.      If the ----dddd option is specified, verbose debugging information is written
  32.      to the syslog.  Note: this option logs all the commands and arguments
  33.      that the client sends. However arguments from the PASS command for normal
  34.      accounts are not logged.
  35.  
  36.      The ftp server will timeout an inactive session after 15 minutes.  If the
  37.      ----tttt option is specified, the inactivity timeout period will be set to
  38.      _t_i_m_e_o_u_t seconds.  A client may also request a different timeout period;
  39.      the maximum period allowed may be set to _t_i_m_e_o_u_t seconds with the ----TTTT
  40.      option.  The default limit is 2 hours.
  41.  
  42.      The ----uuuu option specifies the default file protection mask (see _u_m_a_s_k(1)).
  43.      If not specified, the default mask is set to 022 (group- and world-
  44.      readable).  A client may also request a different mask.
  45.  
  46.      The ----SSSS option turns on extra safety measures for anonymous FTP sites.
  47.      For one thing, makes symbolic links appear to be ordinary links, so that
  48.      links do not leak names in 'private' directories.  (Those are directories
  49.      that are not searchable by anonymous users.)
  50.  
  51.      The ----pppp option causes the IP addresses of the data and control connections
  52.      to be compared. Data transfer is allowed only if the IP address of the
  53.      data recipient (or sender) is identical to the IP address used for the
  54.      client's end of the control connection. This prevents the PORT command
  55.      from redirecting the ftp-data connection to a third party and thereby
  56.      provides added protection from network scanning. It also prevents data
  57.      from being transferred to or from a third party while using passive data
  58.      transfer mode. Note that the ----pppp option precludes "proxy" ftp in which a
  59.      client arranges for the transfer of data between two ftp servers.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. FFFFTTTTPPPPDDDD((((1111MMMM))))                                                              FFFFTTTTPPPPDDDD((((1111MMMM))))
  71.  
  72.  
  73.  
  74.      The file /_e_t_c/_n_o_l_o_g_i_n can be used to disable ftp access.  If the file
  75.      exists, _f_t_p_d prints it and exits.  If the file /_e_t_c/_i_s_s_u_e exists, _f_t_p_d
  76.      prints it before issuing the ``ready'' message.
  77.  
  78.      The ftp server currently supports the following ftp requests; case is not
  79.      distinguished.
  80.  
  81.      RRRReeeeqqqquuuueeeesssstttt        DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
  82.      ABOR           abort previous command
  83.      ACCT           specify account (ignored)
  84.      ALLO           allocate storage (vacuously)
  85.      APPE           append to a file
  86.      CDUP           change to parent of current working directory
  87.      CWD            change working directory
  88.      DELE           delete a file
  89.      HELP           give help information
  90.      LIST           give list files in a directory (``ls -lA'')
  91.      MKD            make a directory
  92.      MDTM           show last modification time of file
  93.      MODE           specify data transfer _m_o_d_e
  94.      NLST           give name list of files in directory
  95.      NOOP           do nothing
  96.      PASS           specify password
  97.      PASV           prepare for server-to-server transfer
  98.      PORT           specify data connection port
  99.      PWD            print the current working directory
  100.      QUIT           terminate session
  101.      REST           restart incomplete transfer
  102.      RETR           retrieve a file
  103.      RMD            remove a directory
  104.      RNFR           specify rename-from file name
  105.      RNTO           specify rename-to file name
  106.      SITE           non-standard commands (see next section)
  107.      SIZE           return size of file
  108.      STAT           return status of server
  109.      STOR           store a file
  110.      STOU           store a file with a unique name
  111.      STRU           specify data transfer _s_t_r_u_c_t_u_r_e
  112.      SYST           show operating system type of server system
  113.      TYPE           specify data transfer _t_y_p_e
  114.      USER           specify user name
  115.      XCUP           change to parent of current working directory (deprecated)
  116.      XCWD           change working directory (deprecated)
  117.      XMKD           make a directory (deprecated)
  118.      XPWD           print the current working directory (deprecated)
  119.      XRMD           remove a directory (deprecated)
  120.  
  121.      The following non-standard or UNIX specific commands are supported by the
  122.      SITE request.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. FFFFTTTTPPPPDDDD((((1111MMMM))))                                                              FFFFTTTTPPPPDDDD((((1111MMMM))))
  137.  
  138.  
  139.  
  140.      RRRReeeeqqqquuuueeeesssstttt        DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
  141.      UMASK          change umask, e.g., SITE UMASK 002
  142.      IDLE           set idle-timer, e.g., SITE IDLE 60
  143.      CHMOD          change mode of a file, e.g., SITE CHMOD 755 filename
  144.      HELP           give help information, e.g., SITE HELP
  145.  
  146.      The remaining ftp requests specified in Internet RFC 959 are recognized,
  147.      but not implemented.  MDTM and SIZE are not specified in RFC 959, but
  148.      will appear in the next updated FTP RFC.
  149.  
  150.      The ftp server will abort an active file transfer only when the ABOR
  151.      command is preceded by a Telnet "Interrupt Process" (IP) signal and a
  152.      Telnet "Synch" signal in the command Telnet stream, as described in
  153.      Internet RFC 959.  If a STAT command is received during a data transfer,
  154.      preceded by a Telnet IP and Synch, transfer status will be returned.
  155.  
  156.      _F_t_p_d interprets file names according to the ``globbing'' conventions used
  157.      by _c_s_h(1).  This allows users to utilize the metacharacters ``*?[]{}~''.
  158.  
  159.      _F_t_p_d authenticates users according to three rules.
  160.  
  161.      1) The user name must be in the password data base, /_e_t_c/_p_a_s_s_w_d, and not
  162.         have a null password.  In this case a password must be provided by the
  163.         client before any file operations may be performed.
  164.  
  165.      2) The user name must not appear in the file /_e_t_c/_f_t_p_u_s_e_r_s.  However, if
  166.         the user name is in /_e_t_c/_f_t_p_u_s_e_r_s followed by the white-space
  167.         separated keyword ``restrict'', the user is allowed restricted access
  168.         privileges, as described below.
  169.  
  170.      3) If the user name is ``anonymous'' or ``ftp'', an anonymous ftp account
  171.         must be present in the password file (user ``ftp'').  In this case the
  172.         user is allowed to log in by specifying any password (by convention
  173.         this is given as the client user and host name).
  174.  
  175.      For the restricted and anonymous accounts, _f_t_p_d takes special measures to
  176.      restrict the client's access privileges.  The server performs a _c_h_r_o_o_t(2)
  177.      command to the home directory of the user and prints the file README if
  178.      it exists.  In order that system security is not breached, it is
  179.      recommended that the subtree be constructed with care;  the following
  180.      rules are recommended, using the ``ftp'' anonymous account as an example.
  181.      If you allow logins as the ftp account, then you should instead make all
  182.      the files and directories owned by a user and group other than ftp (or
  183.      any other account that can login using the restricted passwd file in the
  184.      chrooted tree), with the possible exception of directories to which you
  185.      allow file transfers, such as ~ftp/pub.  Remember that because the
  186.      account name and password are valid, the user will be able to login
  187.      directly or via _t_e_l_n_e_t, _r_l_o_g_i_n, or _r_s_h.  This can be prevented, if
  188.      desired, by using the feature documented in the _p_a_s_s_w_d(4) man page,
  189.      having the shell field start with ****, and the home directory being a real
  190.      or impossible base for the chrooted environment.  See that manual page
  191.      for more information.
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. FFFFTTTTPPPPDDDD((((1111MMMM))))                                                              FFFFTTTTPPPPDDDD((((1111MMMM))))
  203.  
  204.  
  205.  
  206.      Note that _f_t_p_d uses the information in /_e_t_c/_p_a_s_s_w_d to perform
  207.      authentication and to establish its environment; i.e., _f_t_p_d does not use
  208.      the _e_t_c/_p_a_s_s_w_d file in the chrooted tree (unlike _l_o_g_i_n(1)).
  209.  
  210.  
  211.      ~ftp      Make the home directory owned by ``bin'' and unwritable by
  212.                anyone (mode 555 - see _c_h_m_o_d(1)):
  213.  
  214.                     chown bin ~ftp
  215.                     chmod a-w ~ftp
  216.  
  217.  
  218.      ~ftp/bin  Make this directory owned by the super-user and unwritable by
  219.                anyone (mode 555).  The program _l_s(1) must be present to
  220.                support the list commands.  This program should have mode 111.
  221.  
  222.      ~ftp/etc  Make this directory owned by the super-user and unwritable by
  223.                anyone (mode 555).  The files _p_a_s_s_w_d(4) and _g_r_o_u_p(4) must be
  224.                present for the _l_s command to be able to produce owner names
  225.                rather than numbers.  This should not be a copy of the real
  226.                file in /etc, and in particular, it should contain no encrypted
  227.                passwords from the real /etc/passwd or /etc/group.  The
  228.                password field in _p_a_s_s_w_d is not used.  Only the minimal number
  229.                of accounts should be listed.  These files should be mode 444.
  230.  
  231.      ~ftp/lib32
  232.                Make this directory own by the super-user and unwritable by
  233.                anyone (mode 555).  In order for ls to run, the files
  234.                /_l_i_b_3_2/_r_l_d and /_l_i_b_3_2/_l_i_b_c._s_o._1 must be copied into lib32
  235.                (older releases, or some uses of other programs might also
  236.                require the o32 versions in /_l_i_b.  Both _r_l_d and _l_i_b_c._s_o._1
  237.                should be readable and executable by everyone, _e._g. mode 555.
  238.  
  239.      ~ftp/dev  Make this directory owned by the super-user and unwritable by
  240.                anyone (mode 555).  _r_l_d uses /_d_e_v/_z_e_r_o, so use mknod(1) to make
  241.                a copy  of /_d_e_v/_z_e_r_o in ~ftp/dev with the same major and minor
  242.                device numbers.  Make /_d_e_v/_z_e_r_o read-only (mode 444).
  243.  
  244.                     mknod ~ftp/dev/zero c 37 0
  245.                     chmod 444 ~ftp/dev/zero
  246.  
  247.  
  248.      ~ftp/pub  Make this directory owned by ``ftp''. If local users and remote
  249.                anonymous users are to be allowed to write in this directory,
  250.                change the directory's mode to 777.  Users can then place files
  251.                which are to be accessible via the anonymous account in this
  252.                directory.  If write accesses are to be denied, change the
  253.                directory's mode to 555.
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. FFFFTTTTPPPPDDDD((((1111MMMM))))                                                              FFFFTTTTPPPPDDDD((((1111MMMM))))
  269.  
  270.  
  271.  
  272. SHARE II ACTIONS
  273.      If the Share II system is installed and enabled, then the following
  274.      privilege and resource checks are made immediately after the other
  275.      validation checks are passed but before the ftp session is permitted to
  276.      begin:
  277.  
  278.      1.  If your _nnnn_oooo_llll_oooo_gggg_iiii_nnnn flag is set, or you already have another connection
  279.          and your _oooo_nnnn_eeee_llll_oooo_gggg_iiii_nnnn flag is set, then you are denied connection.
  280.  
  281.      2.  If a disk usage exceeds its soft disk limit in any of your domains,
  282.          then a message is printed and you are given a _w_a_r_n_i_n_g.  If you
  283.          accumulate too many warnings, further connection attempts are denied
  284.          and you must see your subadministrator to rectify the situation.
  285.          Whenever you connect with no disk usages in excess of any soft
  286.          limits, all your accumulated warnings are cleared.
  287.  
  288.      3.  If you do not have permission to use an _f_t_p connection, as determined
  289.          by the terminal permission flag _tttt_eeee_rrrr_mmmm_iiii_nnnn_aaaa_llll_...._ffff_llll_aaaa_gggg_...._ffff_tttt_pppp, then you are
  290.          denied connection.
  291.  
  292.      4.  Some installations place limits on terminal connect-time, which apply
  293.          equally to connection by way of _f_t_p.  If you have already reached
  294.          your connect-time limit, then you are denied connection.  Otherwise,
  295.          if you have a limit, your remaining connect-time is printed.
  296.  
  297.      If all of these checks are passed, _ffff_tttt_pppp_dddd proceeds normally.
  298.  
  299. FFFFIIIILLLLEEEESSSS
  300.      /etc/ftpusers     list of unwelcome/restricted users
  301.      /etc/issue        welcome notice
  302.      /etc/nologin      disables access
  303.      /etc/limconf      The compiled Share II configuration file (machine
  304.      readable)
  305.  
  306. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  307.      login(1), ftp(1C), inetd(1M), rexecd(1M), syslogd(1M), passwd(4),
  308.      share(5)
  309.  
  310. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  311.      The Share II specific diagnostic messages are listed as follows:
  312.  
  313.      _WWWW_aaaa_rrrr_nnnn_iiii_nnnn_gggg _X _oooo_ffff _Y: soft disk limit exceeded.
  314.           One of your domains has a disk usage in excess of its soft limit.
  315.  
  316.      _CCCC_oooo_nnnn_nnnn_eeee_cccc_tttt_iiii_oooo_nnnn _dddd_eeee_nnnn_iiii_eeee_dddd_....  _TTTT_oooo_oooo _mmmm_aaaa_nnnn_yyyy _wwww_aaaa_rrrr_nnnn_iiii_nnnn_gggg_ssss_....
  317.           You have reached your warning limit.  See your subadministrator.
  318.  
  319.      _CCCC_oooo_nnnn_nnnn_eeee_cccc_tttt_iiii_oooo_nnnn _dddd_eeee_nnnn_iiii_eeee_dddd_....  _AAAA_llll_rrrr_eeee_aaaa_dddd_yyyy _llll_oooo_gggg_gggg_eeee_dddd _iiii_nnnn _---- _oooo_nnnn_llll_yyyy _oooo_nnnn_eeee _llll_oooo_gggg_iiii_nnnn _aaaa_llll_llll_oooo_wwww_eeee_dddd_....
  320.           You are already connected to the system and your _oooo_nnnn_eeee_llll_oooo_gggg_iiii_nnnn flag is
  321.           set.
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. FFFFTTTTPPPPDDDD((((1111MMMM))))                                                              FFFFTTTTPPPPDDDD((((1111MMMM))))
  335.  
  336.  
  337.  
  338.      _CCCC_oooo_nnnn_nnnn_eeee_cccc_tttt_iiii_oooo_nnnn _dddd_eeee_nnnn_iiii_eeee_dddd_....  _CCCC_uuuu_rrrr_rrrr_eeee_nnnn_tttt_llll_yyyy _bbbb_aaaa_rrrr_rrrr_eeee_dddd _ffff_rrrr_oooo_mmmm _llll_oooo_gggg_gggg_iiii_nnnn_gggg _iiii_nnnn_....
  339.           Your _nnnn_oooo_llll_oooo_gggg_iiii_nnnn flag is set.
  340.  
  341.      _CCCC_oooo_nnnn_nnnn_eeee_cccc_tttt_iiii_oooo_nnnn _dddd_eeee_nnnn_iiii_eeee_dddd_....  _NNNN_oooo _pppp_eeee_rrrr_mmmm_iiii_ssss_ssss_iiii_oooo_nnnn _tttt_oooo _uuuu_ssss_eeee _tttt_hhhh_iiii_ssss _tttt_eeee_rrrr_mmmm_iiii_nnnn_aaaa_llll_....
  342.           You are not allowed to log in at this terminal because of a clear
  343.           _tttt_eeee_rrrr_mmmm_iiii_nnnn_aaaa_llll_...._ffff_llll_aaaa_gggg_...._rrrr_ssss_hhhh flag.
  344.  
  345.      _YYYY_oooo_uuuu _hhhh_aaaa_vvvv_eeee _aaaa _rrrr_eeee_mmmm_aaaa_iiii_nnnn_iiii_nnnn_gggg _tttt_eeee_rrrr_mmmm_iiii_nnnn_aaaa_llll _cccc_oooo_nnnn_nnnn_eeee_cccc_tttt_----_tttt_iiii_mmmm_eeee _oooo_ffff _Y.
  346.           You may use this connection until you have used up your remaining
  347.           connect-time, at which point you are forced to disconnect.
  348.  
  349.      _CCCC_oooo_nnnn_nnnn_eeee_cccc_tttt_iiii_oooo_nnnn _dddd_eeee_nnnn_iiii_eeee_dddd_....  _TTTT_eeee_rrrr_mmmm_iiii_nnnn_aaaa_llll _cccc_oooo_nnnn_nnnn_eeee_cccc_tttt_----_tttt_iiii_mmmm_eeee _llll_iiii_mmmm_iiii_tttt _eeee_xxxx_cccc_eeee_eeee_dddd_eeee_dddd_....
  350.           You have already reached your terminal connect-time limit.
  351.  
  352.      _SSSS_hhhh_aaaa_rrrr_eeee _nnnn_oooo_tttt _cccc_oooo_nnnn_ffff_iiii_gggg_uuuu_rrrr_eeee_dddd _---- _nnnn_oooo _llll_iiii_mmmm_iiii_tttt _cccc_hhhh_eeee_cccc_kkkk_ssss_....
  353.           The configuration file is unreadable for some reason, so terminal
  354.           privileges, connect-time limits and disk space limits could not be
  355.           checked.
  356.  
  357. BBBBUUUUGGGGSSSS
  358.      The anonymous account is inherently dangerous and should avoided when
  359.      possible.
  360.  
  361.      The server must run as the super-user to create sockets with privileged
  362.      port numbers.  It maintains an effective user ID of the logged in user,
  363.      reverting to the super-user only when binding addresses to sockets.  The
  364.      possible security holes have been extensively scrutinized, but are
  365.      possibly incomplete.
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.